﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Entity.Infrastructure;

namespace ERPStore.Cart.Repositories
{
	public class DbContextFactory : CloudSoft.Repositories.DbContextFactory<CartDbContext>
	{
		public DbContextFactory(Models.Settings settings)
		{
			this.Settings = settings;
		}

		protected Models.Settings Settings { get; private set; }

		protected override CartDbContext CreateDbContext()
		{
			var result = new CartDbContext(Settings.ConnectionStringName);
			return result;
		}
	}
}
